#ARG DOCKER_REGISTER='49.235.121.139'

FROM wn-php:8.2
COPY deploy/nginx/nginx.conf /usr/local/openresty/nginx/conf/
COPY deploy/nginx/web.conf /usr/local/openresty/nginx/conf/sites/
COPY deploy/php8.0-fpm/www.conf /etc/php/8.0/fpm/pool.d/www.conf
WORKDIR /www/workspace/
COPY --chown=www-data:www-data  . .
ARG ENV="local"

RUN composer install && cp .env.${ENV} .env
EXPOSE 80
ENTRYPOINT  ["bash","./deploy/start.sh"]
